﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NorthwindClient
{
    public class CellControl
    {
        public int CordX
        { get; set; }

        public int GridColumn
        {
            get
            { return CordX * 2; }
        }

        public int CordY
        { get; set; }

        public int GridRow
        {
            get
            { return CordY * 2; }
        }

        public int Width
        { get; set; }

        public int GridColumnSpan
        {
            get { return (Width - 1) * 2 + 1; }
        }

        public int Height
        { get; set; }

        public int GridRowSpan
        {
            get { return (Height - 1) * 2 + 1; }
        }

        public string Label
        { get; set; }

        public static List<CellControl> GetCellControls()
        {
            List<CellControl> cellControls = new List<CellControl>();
            cellControls.Add(new CellControl()
            {
                CordX = 0,
                CordY = 0,
                Width = 1,
                Height = 2
            });
            cellControls.Add(new CellControl()
            {
                CordX = 1,
                CordY = 0,
                Width = 1,
                Height = 1
            });
            cellControls.Add(new CellControl()
            {
                CordX = 1,
                CordY = 1,
                Width = 1,
                Height = 2
            });
            cellControls.Add(new CellControl()
            {
                CordX = 2,
                CordY = 0,
                Width = 1,
                Height = 1
            });
            cellControls.Add(new CellControl()
            {
                CordX = 2,
                CordY = 2,
                Width = 1,
                Height = 2
            });
            cellControls.Add(new CellControl()
            {
                CordX = 3,
                CordY = 2,
                Width = 2,
                Height = 1
            });
            cellControls.Add(new CellControl()
            {
                CordX = 2,
                CordY = 1,
                Width = 2,
                Height = 1
            });
            cellControls.Add(new CellControl()
            {
                CordX = 4,
                CordY = 0,
                Width = 1,
                Height = 1
            });
            cellControls.Add(new CellControl()
            {
                CordX = 5,
                CordY = 0,
                Width = 2,
                Height = 2
            });
            cellControls.Add(new CellControl()
            {
                CordX = 7,
                CordY = 0,
                Width = 1,
                Height = 2
            });
            return cellControls;
        }
    }
}
